Method for assisting video compression in a computer system

ABSTRACT

One embodiment of the present invention provides a method that facilitates compression of video data in a computer system by performing the time-consuming task of computing the difference between successive frames of video data independently from the central processing unit. This frees the often-overburdened central processing unit from performing this time-consuming compression operation and can thereby improve the handling of video data. Thus, one embodiment of the present invention can be characterized as a method for compressing video data in a computer system. This method includes receiving a stream of data from a current video frame in the computer system. It also includes computing a difference frame from the current video frame and a previous video frame “on-the-fly” as the current video frame streams into the computer system. The method additionally includes storing the difference frame in a memory in the computer system.

RELATED APPLICATION

The subject matter of this application is related to the subject matterin a co-pending non-provisional application by the same inventor as theinstant application entitled, “Apparatus for Assisting Video Compressionin a Computer System,” having Ser. No. 09/048,932, and filing date Mar.26, 1998.

BACKGROUND

1. Field of the Invention

The present invention relates to compressing video data, and morespecifically to a method that provides assistance to a computer systemin compressing a stream of video data on-the-fly, as the video datastreams into the computer system.

2. Related Art

As video data is increasingly used in computer systems in applicationssuch as video conferencing and video recording, computer systems oftencannot keep pace with the computational requirements of video data.Video data streams typically have extremely large bandwidth requirementsthat can tax the capabilities of even the most high-speed processor tocompress the video data for storage, or for transmission across acomputer network or a telephone system. This compression is typicallyperformed by a central processing unit (CPU) in a computer system with aresulting loss in image clarity due to the failure of the CPU to keeppace with the video data. Complex scenes, having many elements that arein motion represent the greatest challenge because they place atremendous burden on the CPU during the compression and data transferprocesses.

A time-consuming step in the compression of video data is to computedifferences between successive video frames. A CPU typically computes adifference frame by reading a current video frame into memory andcomputing the difference between the current video frame and a previousvideo frame, which was previously stored into a memory in the computersystem. Computing the difference typically involves performing anexclusive-OR operation between the current video frame and the previousvideo frame. In general, any function that effectively represents thedifference between two successive video frames can be used with onlyminor modifications to the related compression algorithm. Hence, a largenumber of possible functions can be used to compute the differencebetween successive video frames.

What is needed is an apparatus or a method for off-loading thetime-consuming task of computing the difference between successiveframes of video data from the CPU of a computing system.

SUMMARY

One embodiment of the present invention provides a method thatfacilitates compression of video data in a computer system by performingthe time-consuming task of computing the difference between successiveframes of video data independently from the central processing unit.This frees the often-overburdened central processing unit fromperforming this time-consuming compression operation and can therebyimprove the handling of video data. Thus, one embodiment of the presentinvention can be characterized as a method for compressing video data ina computer system. This method includes receiving a stream of data froma current video frame in the computer system. It also includes computinga difference frame from the current video frame and a previous videoframe “on-the-fly” as the current video frame streams into the computersystem. The method additionally includes storing the difference frame ina memory in the computer system.

Another embodiment of the present invention includes storing the currentvideo frame in the memory. In a variation on this embodiment, thecurrent video frame is written over a previous video frame in thememory.

In another embodiment of the present invention, computing the differenceframe includes performing an exclusive-OR operation between the currentvideo frame and the previous video frame. In another embodiment,computing the difference frame includes computing a difference between ablock of data from the current video frame and a block of data from theprevious video frame.

In another embodiment of the present invention, storing the differenceframe in the memory includes storing the difference frame in the memoryusing block transfers.

Another embodiment of the present invention includes compressing thevideo data using the difference frame to produce compressed video data.

Another embodiment of the present invention includes performing colorspace conversion on the video data. Yet another embodiment includesusing the video data in compressed form in a video teleconferencingsystem. A further embodiment includes storing instructions and data forthe computer system in the memory.

In another embodiment of the present invention, computing the differenceframe includes computing the difference frame in a core logic chipwithin the computer system. In another embodiment, computing thedifference frame includes computing the difference frame in circuitryoutside of a central processing unit in the computer system.

DESCRIPTION OF THE FIGURES

FIG. 1 illustrates a computer system including a graphics controllerwith a difference engine in accordance with an embodiment of the presentinvention.

FIG. 2 illustrates a computer system including a graphics controllerincorporated into a core logic unit in accordance with anotherembodiment of the present invention.

FIG. 3 illustrates the internal structure of a portion of the graphicscontroller that computes the difference between successive video framesin accordance with an embodiment of the present invention.

FIG. 4 is a block diagram illustrating a method for compressing videodata in a computer system in accordance with an embodiment of thepresent invention.

DEFINITIONS

Color space conversion unit—circuitry that maps one set of color valuesto another set of color values.

Computing on-the-fly—performing a computational operation on datastreams through a computer system.

Core logic unit—circuitry within a computer system that interfaces aprocessor to a memory and a peripheral bus and performs other functions.

Difference engine—circuitry that computes a difference function betweensuccessive video frames. This difference function may be an exclusive-ORoperation.

DETAILED DESCRIPTION OF THE INVENTION

The following description is presented to enable any person skilled inthe art to make and use the invention and is provided in the context ofa particular application and its requirements. Various modifications tothe disclosed embodiments will be readily apparent to those skilled inthe art, and the general principles defined herein may be applied toother embodiments and applications without departing from the spirit andscope of the present invention. Thus, the present invention is notintended to be limited to the embodiments shown, but is to be accordedthe widest scope consistent with the principles and features disclosedherein.

Description of a First Embodiment of the Computer System

FIG. 1 illustrates a computer system including a graphics controllerwith a difference engine 106 in accordance with an embodiment of thepresent invention. The embodiment illustrated in FIG. 1 includes centralprocessing unit (CPU) 120, which is coupled through north bridge 118 tomemory 122 and bus 116. CPU 120 may be any type of central processingunit that can be used in a computer system. This includes, but is notlimited to, a microprocessor CPU, a mainframe CPU and a devicecontroller CPU. North bridge 118 forms part of the “core logic” for thecomputer system. This core logic ties together and coordinatesoperations of components in the computer system. Memory 122 can be anytype of semiconductor memory that can be used in a computer system. Bus116 can be any type of computer system bus. In one embodiment, bus 116includes a PCI bus.

Bus 116 is also coupled to graphics controller 106, which includes adifference engine. In this embodiment, graphics controller 106 includescircuitry to perform a difference operation between successive videoframes. Graphics controller 106 is also coupled to memory 108 and videounit 102. Graphics controller 106 additionally produces video output114, which feeds into a computer system monitor.

Memory 108 may be any type of semiconductor memory that may be used in acomputer system. In one embodiment of the present invention, memory 108is a dedicated graphics memory for graphics controller 106, which isseparate from memory 122. In another embodiment, memory 108 and memory122 are part of the same memory. In the illustrated embodiment, memory108 includes an area for storing unmodified video data 110 and an areafor storing XOR video data 112. In one embodiment, the area for storingunmodified video data 110 stores a previous frame of unmodified video,and the area for storing XOR video data 112 stores a difference framecontaining the exclusive-OR of a current frame and the previous frame.Other embodiments of the present invention may use other differencefunctions besides exclusive-OR.

Video unit 102 receives video input 100 in analog form and converts itto digital form. In the illustrated embodiment, video unit 102 receivesvideo input 100 in either PAL or NTSC format, and produces digital videodata in YUV data 104. Video unit 102 may include the BT829 chip producedby Rockwell Semiconductor Systems, Inc. of Newport Beach, Calif.Alternatively, the Rockwell BT848 part may be used to transfer dataacross a computer system bus into system memory or into a videocontroller's memory. (In some embodiments, these may be the samememory). Additionally, video data may be received from external sourcesthrough serial buses that can stream video data into system memory,usually by transferring data across bus 116. These serial buses mayinclude the USB or the IEEE 1394 bus.

The embodiment illustrated in FIG. 1 operates as follows. Video input100 streams into video unit 102, which converts video input 100 intodigital YUV data 104. YUV data 104 feeds into graphics controller 106,which produces video output 114 for display on a computer systemmonitor. Graphics controller 106 additionally stores unmodified videodata into unmodified video data 110 within memory 108. Graphicscontroller 106 also computes the difference between a current videoframe and a previous video frame and stores this difference informationin XOR video data 112 in memory 108. This difference information is usedby CPU 120 to complete the compression process for the video datastream.

Description of a Second Embodiment

FIG. 2 illustrates a computer system including a graphics controllerincorporated into a core logic unit 200 in accordance with anotherembodiment of the present invention. This embodiment is similar to theembodiment illustrated in FIG. 1, except that graphics controller 106and north bridge 118 from FIG. 1 are combined into a single core logicunit 200 with graphics controller. Additionally, memory 108 and memory122 from FIG. 1 are combined into a single memory 122 in FIG. 2.

In the embodiment illustrated in FIG. 2, core logic unit 200 includescircuitry to compute the difference between successive video frames aswell as circuitry to perform other graphics controller functions.

The embodiment illustrated in FIG. 2 operates in the same way as theembodiment illustrated in FIG. 1, except that in FIG. 2, unmodifiedvideo data 110 and XOR video data 112 are not stored in a separategraphics memory 108, but are rather stored in the system memory 122.Hence, CPU 120 does not have to reach out across bus 116 to retrieve XORvideo data 112 from a separate graphics memory to complete thecompression process. It merely has to retrieve the XOR video data 112from the system memory.

Description of Internal Structure of Graphics Controller

FIG. 3 illustrates the internal structure for a portion of a graphicscontroller that computes the difference between successive video framesin accordance with an embodiment of the present invention. The circuitryillustrated in FIG. 3 can exist in either graphics controller 106 fromFIG. 1 or in core logic unit 200 from FIG. 2. The circuitry illustratedin FIG. 3 includes YUV data 104, which feeds through color spaceconversion module 302. This module may perform color re-mapping on YUVdata 104. The output of color space conversion module 302 feeds intovideo input buffer 304. From video input buffer 304, the video datafeeds either into XOR unit 308 and multiplexer (MUX) 312. XOR unit 308takes another input from previous frame buffer 306 and generates anoutput, which feeds into result buffer 310. Data from result buffer 310feeds through MUX 312 and I/O buffers 316 into memory 108. MUX 312 takesanother input from other write circuits 314. This allows data to bewritten to memory 122 from other sources. Data read from memory 122feeds into previous frame buffer 306, and then into XOR unit 308.Alternatively, data read from memory 122 may feed into other readcircuits 315, allowing data to be read from memory 122 by other sources.Data read from memory 122 may also pass through serializer 330, colorlookup table 332 and digital-to-analog converter 334 before becomingvideo output 114 to a monitor. Serializer 330 converts data read frommemory 122 into a serial bitstream. This bitstream is modified in colorlookup table 332, and is ultimately converted into analog form indigital-to-analog converter 334.

The circuitry illustrated in FIG. 3 operates as follows. Video data inYUV form 104 from video unit 102 streams into video input buffer 304through color space conversion module 302. From video input buffer 304,this video data feeds through MUX 312 and I/O buffers 316 intounmodified video data 110 within memory 122. At the same time, data fora previous frame from unmodified video data 110 in memory 122 feeds intoprevious frame buffer 306 through I/O buffer 316. From previous framebuffer 306, this data feeds into XOR unit 308. XOR unit 308 computes thedifference between data from the previous frame, stored in previousframe buffer 306, and data from the current frame, stored in video inputbuffer 304. The output of XOR unit 308 feeds into result buffer 310.From result buffer 310, this data feeds through MUX 312 and I/O buffers316 into an area for storing XOR video data 112 within memory 122. CPU120 then uses this difference information to compress the video data.

In one embodiment, data is processed a block at a time through XOR unit308, wherein a block includes multiple words of data.

In the embodiment illustrated in FIG. 3, data for the current frame isoverwritten over data for the previous frame as the data for theprevious frame is retrieved into previous frame buffer 306. This allowsthe frame data to be stored in one location without using “ping pong”buffers.

The embodiment illustrated in FIG. 3 also includes registers for storingaddress A 322 and address B 324. Address A 322 and address B 324 arepointers into memory 122 for keeping track of data within unmodifiedvideo data 110 and XOR video data 112 within memory 122.

Description of Method for Compressing Video Data

FIG. 4 is a flow chart illustrating a method for compressing video datain a computer system in accordance with an embodiment of the presentinvention. This flow chart is divided into two columns. The column onthe left-hand-side represents operations of the computational unit, andthe column on the right-hand-side represents operations of the memorysystem. In this embodiment, the system starts in state 400. From state400, the computational proceeds to state 402. In state 402, thecomputational unit receives a stream of data from a current video framefrom a video source. The computational unit next proceeds to state 404.In state 404, the computational unit performs a color space conversionon the video data. The computational unit next proceeds to state 406. Instate 406, the computational unit computes a difference frame from acurrent video frame and a previous video frame received from the memorysystem “on-the-fly” as the current video frame streams into the computersystem. In one embodiment, this difference computation takes placewithout intervention by the CPU 120. The computational unit nextproceeds to state 412. In state 412, the computational unit producescompressed video data using the difference frame. The computational unitthen loops back around to state 402 to process more video data.

From state 400, the memory system proceeds to state 422. In state 422,the memory system fetches a block of data from the previous frame. Thisblock of data is forwarded to the computational unit for use in state406. The memory system next proceeds to state 424, in which the memorysystem stores the current video frame—received from the computationalunit in state 404—into memory 122. The memory system next proceeds atstate 426. In state 426, the memory system stores the difference frameinto memory 122. The memory system then loops back around to state 422to process more video data.

The foregoing descriptions of embodiments of the invention have beenpresented for purposes of illustration and description only. They arenot intended to be exhaustive or to limit the invention to the formsdisclosed. Obviously, many modifications and variations will be apparentto practitioners skilled in the art.

1. A method for compressing video data in a computer system comprising:receiving a current video frame at a dedicated video input of a corelogic chip in the computer system directly from a video sourceoriginating the video frame, the computer system including the corelogic chip for directly coupling a processor to a system memory and forcoupling the processor and the system memory to a system bus; computingat the core logic chip a difference frame from the current video frameand a previous video frame as the current video frame streams into thededicated video input of the core logic chip, the previous video framebeing received at the core logic chip as a previous current video frameand retained therein, the difference frame including computing thedifference frame in the core logic chip within the computer system,wherein the core logic chip is a north bridge chip; storing thedifference frame directly from the core logic chip to the system memoryin the computer system via a dedicated memory interface therebetween;and the processor retrieving the difference frame directly from thesystem memory via the core logic chip using a dedicated processorinterface therebetween to complete compression of the video data.
 2. Themethod of claim 1, including storing the current video frame in thesystem memory in the computer system.
 3. The method of claim 2, whereinthe current video frame is written over a previous video frame in thesystem memory.
 4. The method of claim 1, wherein computing thedifference frame includes computing an exclusive-OR between the currentvideo frame and the previous video frame.
 5. The method of claim 1,wherein computing the difference frame includes computing a differencebetween a block of data from the current video frame and a block of datafrom the previous video frame.
 6. The method of claim 1, wherein storingthe difference frame in memory includes storing the difference frame inthe system memory using block transfers.
 7. The method of claim 1,including compressing the video data using the difference frame toproduce compressed video data.
 8. The method of claim 1, includingperforming a color space conversion on the video data.
 9. The method ofclaim 1, including using the video data in compressed form in a videoteleconferencing system.
 10. The method of claim 1, wherein computingthe difference frame includes computing the difference frame incircuitry outside of a central processing unit in the computer system.11. A method for compressing video data in a computer system,comprising: receiving a current video frame at a dedicated video inputof a core logic chip in the computer system directly from a video sourceoriginating the video frame, the computer system including the corelogic chip for directly coupling a processor to a system memory and forcoupling the processor and the system memory to a system bus; computingat the core logic chip a difference frame from the current video frameand a previous video frame as the current video frame streams into thededicated video input of the core logic chip, the previous video framebeing received at the core logic chip as a previous current video frameand retained therein, the difference frame including computing anexclusive-OR between the current video frame and the previous videoframe, and wherein computing the difference frame includes computing thedifference frame in the core logic chip within the computer system,wherein the core logic chip is a north bridge chip; storing thedifference frame directly from the core logic chip into the systemmemory in the computer system via a dedicated memory interfacetherebetween; storing the current video frame directly from the corelogic chip into the system memory in the computer system using adedicated processor interface therebetween; the processor retrieving thedifference frame directly from the system memory via the core logicchip; and compressing the video data using the difference frame toproduce compressed video data.
 12. The method of claim 11, wherein thecurrent video frame is written over a previous video frame in the systemmemory.
 13. The method of claim 11, wherein computing the differenceframe includes computing a difference between a block of data from thecurrent video frame and a block of data from the previous video frame.14. The method of claim 11, wherein storing the difference frame insystem memory includes storing the difference frame in the system memoryusing block transfers.
 15. The method of claim 11, including using thecompressed data in a video teleconferencing system.
 16. The method ofclaim 11, including performing a color space conversion on the videodata.
 17. The method of claim 11, including storing instructions anddata for the computer system in the system memory.